<?



	$Query = "select id, $listfield1, $listfield2, $listfield3,addr_en,pub,name from $table order by  $listfield1,$listfield2, $listfield3 Limit $Offset, $ListNum";

	$Query1 = "select count(*) as total from $table";
	

$list = myQuery($Query);



$CountRecord = myQuery($Query1);

$CountNum = $CountRecord[0][0];
$Url="&Search=".urlencode($Search)."&action=$action";	


print(splitPage($Url,$CountNum));

?>


<form name="form1" method="post" action="../../inc/mod_pub_2.php">
		<table width="100%" border="0" cellspacing="1" cellpadding="1" class="tb">
          <tr class="tbheader"> 
            <td width="10%">Name</td>
            <td width="20%">Address(En)</td>
            <td width="20%">Address</td>
            <td width="20%">Info</td>
            <td width="10%">Rate</td>
		    <td width="12%">Publish?</td>
			<td width="20%"></td>
          </tr>


<?
if ($list){
	for ($i=0;$i<count($list);$i++){

?>
          <tr class="tbcontent1"> 
            <td align=center><?
			//$id=$list[$i][0];
			//$sqlin = "select region from med_shipping where cid = '$id' limit 1";
			//$r1=myQuery($sqlin);
			print($id=$list[$i][6]);
			?></td>
            <td><?print($list[$i][4])?></td>
            <td><?print($list[$i][1])?></td>
            <td align=center><?print($list[$i][2])?></td>
            <td align=center><?print($list[$i][3])?>%</td>
		    <td align=center><div align="center">
              <input name="pub[<?=$list[$i][0]?>]" type="radio" id="pub[<?=$list[$i][0]?>]" value="1" <? echo $list[$i][5]?"checked":"";?>> Y 
              <input name="pub[<?=$list[$i][0]?>]" type="radio" id="pub[<?=$list[$i][0]?>]" value="0" <? echo !$list[$i][5]?"checked":"";?>> N 
            </div></td>
			<td align=center bgcolor="ECECEC">
			<a href="edit.php?Start_Num=<?echo $Start_Num?>&id=<?print($list[$i][0])?>"><img src="<?print($rela_path)?>images/bt_edit.gif" border="0" alt="Edit"></a>
			<a href="delete.php?id=Start_Num=<?echo $Start_Num?>&id=<?print($list[$i][0])?>"><img src="<?print($rela_path)?>images/bt_delete.gif" border="0" Alt="Delete"></a>
          </tr>
<?
	}	
}?>

          <tr class="tbcontent1"> 
            <td></td>
            <td></td>
		    <td></td>
		    <td></td>
		    <td></td>
		    <td align=center>
              <input type="submit" name="submit" value="Save">
			  <input type="hidden" name="url" value="../media/claim/claim_menu.php?Start_Num=<?=$Start_Num.$Url.'&ord='.$ord.'&sort='.$sort?>">
			  <input type="hidden" name="table" value="<?=$table?>">
            </td>
			<td></td>
          </tr>
        
		
		</table></form>

<?print(splitPage($Url,$CountNum))?>
